# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-backports
pkgver=1.0
pkgrel=4
pkgdesc='Namespace for backported Python features'
url='https://pypi.org/project/backports/#files'
arch=('any')
license=('PSF')
depends=('python2')

build() {
  # see https://pypi.org/project/backports/
  cat << EOF > __init__.py
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
EOF

  python2 -m compileall .
}

package() {
  install -Dm 644 -t "$pkgdir/usr/lib/python2.7/site-packages/backports/" \
    __init__.*
}

